<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>OpenFOAM-2.3.x 中的 twoPhaseEulerFoam 解析之 kineticTheoryModel 的子模型 | Giskard&#39;s CFD Learning Tricks</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="上一篇博文解读了 kineticTheoryModel  其中提到需要调用子模型来完成其功能，这里将 OpenFOAM 中 kineticTheoryModel 模型的子模型罗列如下。">
<meta property="og:type" content="article">
<meta property="og:title" content="OpenFOAM-2.3.x 中的 twoPhaseEulerFoam 解析之 kineticTheoryModel 的子模型">
<meta property="og:url" content="http://xiaopingqiu.github.io/2015/09/19/kineticTheoryModelSubModels/index.html">
<meta property="og:site_name" content="Giskard's CFD Learning Tricks">
<meta property="og:description" content="上一篇博文解读了 kineticTheoryModel  其中提到需要调用子模型来完成其功能，这里将 OpenFOAM 中 kineticTheoryModel 模型的子模型罗列如下。">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="OpenFOAM-2.3.x 中的 twoPhaseEulerFoam 解析之 kineticTheoryModel 的子模型">
<meta name="twitter:description" content="上一篇博文解读了 kineticTheoryModel  其中提到需要调用子模型来完成其功能，这里将 OpenFOAM 中 kineticTheoryModel 模型的子模型罗列如下。">
  
  
    <link rel="icon" href="/favicon.png">
  
  <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css" type="text/css">
  
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

##ga('create', '[object Object]', 'auto');
ga('create', 'UA-62501686-1', 'auto');
ga('send', 'pageview');

</script>
<!-- End Google Analytics -->


</head>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Giskard&#39;s CFD Learning Tricks</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">CFD and Scientific Computing</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
          <a class="main-nav-link" href="/atom.xml">Rss</a>
        
          <a class="main-nav-link" href="/about">About</a>
        
      </nav>
      <nav id="sub-nav">
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="q" value="site:http://xiaopingqiu.github.io"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-kineticTheoryModelSubModels" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2015/09/19/kineticTheoryModelSubModels/" class="article-date">
  <time datetime="2015-09-19T03:45:35.000Z" itemprop="datePublished">2015-09-19</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/OpenFOAM/">OpenFOAM</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      OpenFOAM-2.3.x 中的 twoPhaseEulerFoam 解析之 kineticTheoryModel 的子模型
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>上一篇博文解读了 <code>kineticTheoryModel</code>  其中提到需要调用子模型来完成其功能，这里将 OpenFOAM 中 <code>kineticTheoryModel</code> 模型的子模型罗列如下。</p>
<a id="more"></a>
<h4 id="1-_viscosityModel">1. viscosityModel</h4><p>viscosityModel 的作用是根据颗粒温度 <code>Theta</code> 来计算固相粘度。<br>基类代码如下，核心是那个返回固相粘度的 <code>nu</code> 函数。<br><figure class="highlight cs"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">namespace</span> <span class="title">Foam</span></span><br><span class="line">&#123;</span><br><span class="line"><span class="keyword">namespace</span> <span class="title">kineticTheoryModels</span></span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*---------------------------------------------------------------------------*\</span><br><span class="line">                           Class viscosityModel Declaration</span><br><span class="line">\*---------------------------------------------------------------------------*/</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">class</span> <span class="title">viscosityModel</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="comment">// Private member functions</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">//- Disallow default bitwise copy construct</span></span><br><span class="line">        viscosityModel(<span class="keyword">const</span> viscosityModel&amp;);</span><br><span class="line"></span><br><span class="line">        <span class="comment">//- Disallow default bitwise assignment</span></span><br><span class="line">        <span class="keyword">void</span> <span class="keyword">operator</span>=(<span class="keyword">const</span> viscosityModel&amp;);</span><br><span class="line"><span class="keyword">protected</span>:</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Protected data</span></span><br><span class="line"></span><br><span class="line">        <span class="keyword">const</span> dictionary&amp; dict_;</span><br><span class="line"><span class="keyword">public</span>:</span><br><span class="line"></span><br><span class="line">    <span class="comment">//- Runtime type information</span></span><br><span class="line">    TypeName(<span class="string">"viscosityModel"</span>);</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Declare runtime constructor selection table</span></span><br><span class="line">    declareRunTimeSelectionTable</span><br><span class="line">    (</span><br><span class="line">        autoPtr,</span><br><span class="line">        viscosityModel,</span><br><span class="line">        dictionary,</span><br><span class="line">        (</span><br><span class="line">            <span class="keyword">const</span> dictionary&amp; dict</span><br><span class="line">        ),</span><br><span class="line">        (dict)</span><br><span class="line">    );</span><br><span class="line">    <span class="comment">// Constructors</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">//- Construct from components</span></span><br><span class="line">        viscosityModel(<span class="keyword">const</span> dictionary&amp; dict);</span><br><span class="line">    <span class="comment">// Selectors</span></span><br><span class="line"></span><br><span class="line">        <span class="function"><span class="keyword">static</span> autoPtr&lt;viscosityModel&gt; <span class="title">New</span></span><br><span class="line">        <span class="params">(</span><br><span class="line">            <span class="keyword">const</span> dictionary&amp; dict</span><br><span class="line">        )</span></span>;</span><br><span class="line"></span><br><span class="line">    <span class="comment">//- Destructor</span></span><br><span class="line">    <span class="keyword">virtual</span> ~viscosityModel();</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="comment">// Member Functions</span></span><br><span class="line"></span><br><span class="line">        <span class="function"><span class="keyword">virtual</span> tmp&lt;volScalarField&gt; <span class="title">nu</span></span><br><span class="line">        <span class="params">(</span><br><span class="line">            <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">            <span class="keyword">const</span> volScalarField&amp; Theta,</span><br><span class="line">            <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">            <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">            <span class="keyword">const</span> volScalarField&amp; da,</span><br><span class="line">            <span class="keyword">const</span> dimensionedScalar&amp; e</span><br><span class="line">        )</span> <span class="keyword">const</span> </span>= <span class="number">0</span>;</span><br><span class="line"></span><br><span class="line">        <span class="function"><span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="title">read</span><span class="params">()</span></span><br><span class="line">        </span>&#123;</span><br><span class="line">            <span class="keyword">return</span> <span class="keyword">true</span>;</span><br><span class="line">        &#125;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure></p>
<p>2.3.x 版自带四种固相粘度模型，分别如下：</p>
<h5 id="1-1_none">1.1 none</h5><p>顾名思义，这个模型计算的固相粘度值为零。<br><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 注意这里的 kineticTheoryModels 不是类名，而是命名空间</span></span><br><span class="line">Foam::tmp&lt;Foam::volScalarField&gt; Foam::kineticTheoryModels::noneViscosity::nu </span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; Theta,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; da,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; e</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">return</span> dimensionedScalar</span><br><span class="line">    (</span><br><span class="line">        <span class="string">"0"</span>,</span><br><span class="line">        dimensionSet(<span class="number">0</span>, <span class="number">2</span>, -<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>),</span><br><span class="line">        <span class="number">0.0</span></span><br><span class="line">    )*alpha1; <span class="comment">// 返回 0</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<h5 id="1-2_Syamlal_模型">1.2 Syamlal 模型</h5><figure class="highlight julia"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>viscosityModels<span class="type-annotation">::</span>Syamlal<span class="type-annotation">::</span>nu</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; Theta,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; da,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> scalar sqrtPi = sqrt(constant<span class="type-annotation">::</span>mathematical<span class="type-annotation">::</span><span class="literal">pi</span>);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> da*sqrt(Theta)*</span><br><span class="line">    (</span><br><span class="line">        (<span class="number">4.0</span>/<span class="number">5.0</span>)*sqr(alpha1)*g0*(<span class="number">1.0</span> + <span class="literal">e</span>)/sqrtPi</span><br><span class="line">      + (<span class="number">1.0</span>/<span class="number">15.0</span>)*sqrtPi*g0*(<span class="number">1.0</span> + <span class="literal">e</span>)*(<span class="number">3.0</span>*<span class="literal">e</span> - <span class="number">1.0</span>)*sqr(alpha1)/(<span class="number">3.0</span> - <span class="literal">e</span>)</span><br><span class="line">      + (<span class="number">1.0</span>/<span class="number">6.0</span>)*alpha1*sqrtPi/(<span class="number">3.0</span> - <span class="literal">e</span>)</span><br><span class="line">    );</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>公式为<br>$$<br>\nu_s = d_p \sqrt{\Theta}\left[ \frac{4}{5}\varepsilon_s^2 g_0  \frac{(1+e)}{\sqrt{\pi}} + \frac{1}{15} \sqrt{\pi} \cdot g_0 \varepsilon_s^2\frac{(1+e)(3e-1)}{\sqrt{\pi}} + \frac{1}{6}\varepsilon_s \frac{\sqrt{\pi}}{3-e}\right ]<br>$$<br>其中$g_0$是由 径向分布模型计算得到的。</p>
<h5 id="1-3_HrenyaSinclair_模型">1.3  HrenyaSinclair 模型</h5><figure class="highlight julia"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br></pre></td><td class="code"><pre><span class="line">//- Characteristic length of geometry</span><br><span class="line">        dimensionedScalar L_; // 新定义的一个变量，</span><br><span class="line">        </span><br><span class="line"> // 构造函数       </span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>viscosityModels<span class="type-annotation">::</span>HrenyaSinclair<span class="type-annotation">::</span>HrenyaSinclair</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> dictionary&amp; dict</span><br><span class="line">)</span><br><span class="line">:</span><br><span class="line">    viscosityModel(dict),</span><br><span class="line">    coeffDict_(dict.subDict(typeName + <span class="string">"Coeffs"</span>)),</span><br><span class="line">    L_(<span class="string">"L"</span>, dimensionSet(<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>), coeffDict_.lookup(<span class="string">"L"</span>)) // 从外部读取 L_ 的值</span><br><span class="line">&#123;&#125;</span><br><span class="line"></span><br><span class="line">        </span><br><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>viscosityModels<span class="type-annotation">::</span>HrenyaSinclair<span class="type-annotation">::</span>nu</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; Theta,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; da,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> scalar sqrtPi = sqrt(constant<span class="type-annotation">::</span>mathematical<span class="type-annotation">::</span><span class="literal">pi</span>);</span><br><span class="line"></span><br><span class="line">    volScalarField lamda</span><br><span class="line">    (</span><br><span class="line">        scalar(<span class="number">1</span>) + da/(<span class="number">6.0</span>*sqrt(<span class="number">2.0</span>)*(alpha1 + scalar(<span class="number">1.0e-5</span>)))/L_</span><br><span class="line">    );</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> da*sqrt(Theta)*</span><br><span class="line">    (</span><br><span class="line">        (<span class="number">4.0</span>/<span class="number">5.0</span>)*sqr(alpha1)*g0*(<span class="number">1.0</span> + <span class="literal">e</span>)/sqrtPi</span><br><span class="line">      + (<span class="number">1.0</span>/<span class="number">15.0</span>)*sqrtPi*g0*(<span class="number">1.0</span> + <span class="literal">e</span>)*(<span class="number">3.0</span>*<span class="literal">e</span> - <span class="number">1</span>)*sqr(alpha1)/(<span class="number">3.0</span>-<span class="literal">e</span>)</span><br><span class="line">      + (<span class="number">1.0</span>/<span class="number">6.0</span>)*sqrtPi*alpha1*(<span class="number">0.5</span>*lamda + <span class="number">0.25</span>*(<span class="number">3.0</span>*<span class="literal">e</span> - <span class="number">1.0</span>))</span><br><span class="line">       /(<span class="number">0.5</span>*(<span class="number">3.0</span> - <span class="literal">e</span>)*lamda)</span><br><span class="line">      + (<span class="number">10</span>/<span class="number">96.0</span>)*sqrtPi/((<span class="number">1.0</span> + <span class="literal">e</span>)*<span class="number">0.5</span>*(<span class="number">3.0</span> - <span class="literal">e</span>)*g0*lamda)</span><br><span class="line">    );</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>公式如下<br>$$<br>\begin{aligned}<br>\nu_s = &amp; d_p \sqrt{\Theta} \, [ \frac{4}{5} \varepsilon_s \cdot g_0 \frac{1+e}{\sqrt{\pi}} + \frac{1}{15}\sqrt{\pi} \cdot g_0 \varepsilon_s^2 \frac{(1+e)(3e-1)}{3-e} \\<br> + &amp; \frac{1}{6} \sqrt{\pi} \cdot \frac{0.5\lambda +  0.25(3e-1)}{0.5(3-e)\lambda} \varepsilon_s + \frac{10}{96}\sqrt{\pi}\cdot \frac{1}{0.5(1+e)(3-e)g_0\cdot \lambda}  ]<br>\end{aligned}<br>$$<br>其中<br>$$<br>\lambda = 1+\frac{d_p}{6\sqrt{2}\cdot \varepsilon_s}\cdot \frac{1}{L}<br>$$</p>
<h5 id="1-4_Gidaspow_模型">1.4 Gidaspow 模型</h5><figure class="highlight julia"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>viscosityModels<span class="type-annotation">::</span>Gidaspow<span class="type-annotation">::</span>nu</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; Theta,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; da,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> scalar sqrtPi = sqrt(constant<span class="type-annotation">::</span>mathematical<span class="type-annotation">::</span><span class="literal">pi</span>);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> da*sqrt(Theta)*</span><br><span class="line">    (</span><br><span class="line">        (<span class="number">4.0</span>/<span class="number">5.0</span>)*sqr(alpha1)*g0*(<span class="number">1.0</span> + <span class="literal">e</span>)/sqrtPi</span><br><span class="line">      + (<span class="number">1.0</span>/<span class="number">15.0</span>)*sqrtPi*g0*(<span class="number">1.0</span> + <span class="literal">e</span>)*sqr(alpha1)</span><br><span class="line">      + (<span class="number">1.0</span>/<span class="number">6.0</span>)*sqrtPi*alpha1</span><br><span class="line">      + (<span class="number">10.0</span>/<span class="number">96.0</span>)*sqrtPi/((<span class="number">1.0</span> + <span class="literal">e</span>)*g0)</span><br><span class="line">    );</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>\nu_s = d_p\sqrt{\Theta}\left [ \frac{4}{5} \varepsilon_s^2 g_0\cdot \frac{(1+e)}{\sqrt{\pi}}  + \frac{1}{15} \sqrt{\pi}\cdot g_0(1+e)\varepsilon_s^2 + \frac{1}{6} \sqrt{\pi}\cdot \varepsilon_s^2 + \frac{10}{96} \frac{\sqrt{\pi}}{(1+e)g_0}\right ]<br>$$</p>
<h4 id="2-_radialModel">2. radialModel</h4><p>这个类的作用是计算径向分布函数 <code>g0</code> </p>
<p>有三种 radialModel 可以选择：</p>
<h5 id="2-1_SinclairJackson">2.1 SinclairJackson</h5><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::radialModels::SinclairJackson::g0</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="number">1.0</span>/(<span class="number">1.0</span> - cbrt(min(alpha, alphaMinFriction)/alphaMax));</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::radialModels::SinclairJackson::g0prime</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="function">volScalarField <span class="title">aByaMax</span></span><br><span class="line">    <span class="params">(</span><br><span class="line">        cbrt(min(max(alpha, scalar(1e-3)</span>), alphaMinFriction)/alphaMax)</span><br><span class="line">    )</span>;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> (<span class="number">1.0</span>/(<span class="number">3</span>*alphaMax))/sqr(aByaMax - sqr(aByaMax));</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>g_0 = \frac{1}{1-\sqrt[3]{\frac{min(\varepsilon_s, \varepsilon_{s,min})}{\varepsilon_{s,max}}}}<br>$$</p>
<p> <code>g0Prime</code> 为 <code>g0</code> 对  <code>alpha</code> 的导数 </p>
<p>$$<br>g_{0Prime} = \frac{\partial g_0}{\partial \varepsilon_s} = \frac{\frac{1}{3\cdot \varepsilon_{s,max}}}{(aByaMax-aByaMax^2)^2}<br>$$</p>
<p>其中</p>
<p>$$<br>aByaMax=\sqrt[3]{\frac{min(\varepsilon_s,\varepsilon_{s,min})}{\varepsilon_{s,max}}}<br>$$</p>
<h5 id="2-2_LunSavage">2.2 LunSavage</h5><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::radialModels::LunSavage::g0</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="built_in">pow</span>(<span class="number">1.0</span> - alpha/alphaMax, -<span class="number">2.5</span>*alphaMax);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::radialModels::LunSavage::g0prime</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="number">2.5</span>*<span class="built_in">pow</span>(<span class="number">1.0</span> - alpha/alphaMax, -<span class="number">2.5</span>*alphaMax - <span class="number">1</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>g_0 = \left( 1-\frac{\varepsilon_s}{\varepsilon_{s,max}}\right)^{-2.5\,\varepsilon_{s,max}}<br>$$</p>
<h5 id="2-3_CarnahanStarling_模型">2.3 CarnahanStarling 模型</h5><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::radialModels::CarnahanStarling::g0</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span></span><br><span class="line">        <span class="number">1.0</span>/(<span class="number">1.0</span> - alpha)</span><br><span class="line">      + <span class="number">3.0</span>*alpha/(<span class="number">2.0</span>*sqr(<span class="number">1.0</span> - alpha))</span><br><span class="line">      + sqr(alpha)/(<span class="number">2.0</span>*pow3(<span class="number">1.0</span> - alpha));</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::radialModels::CarnahanStarling::g0prime</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">return</span></span><br><span class="line">        <span class="number">2.5</span>/sqr(<span class="number">1.0</span> - alpha)</span><br><span class="line">      + <span class="number">4.0</span>*alpha/pow3(<span class="number">1.0</span> - alpha)</span><br><span class="line">      + <span class="number">1.5</span>*sqr(alpha)/pow4(<span class="number">1.0</span> - alpha);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>g_0 = \frac{1}{1-\varepsilon_s} + \frac{3\varepsilon_s}{2(1-\varepsilon_s)^2} + \frac{\varepsilon_s^2}{2(1-\varepsilon_s)^3}<br>$$</p>
<h4 id="3-_granularPressureModel">3. granularPressureModel</h4><p>顾名思义，这个类是用来计算固相压力的。</p>
<p>OpenFOAM 内置两种固相压力模型：</p>
<h5 id="3-1_Lun_模型">3.1 Lun 模型</h5><p><code>granularPressureCoeff</code> 返回的是固相压力的系数，这个返回值乘以颗粒温度 <code>Theta</code> 才是固相压力。<br><figure class="highlight julia"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>granularPressureModels<span class="type-annotation">::</span>Lun<span class="type-annotation">::</span>granularPressureCoeff</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> rho1*alpha1*(<span class="number">1.0</span> + <span class="number">2.0</span>*(<span class="number">1.0</span> + <span class="literal">e</span>)*alpha1*g0);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>granularPressureModels<span class="type-annotation">::</span>Lun<span class="type-annotation">::</span></span><br><span class="line">granularPressureCoeffPrime</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0prime,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">return</span> rho1*(<span class="number">1.0</span> + alpha1*(<span class="number">1.0</span> + <span class="literal">e</span>)*(<span class="number">4.0</span>*g0 + <span class="number">2.0</span>*g0prime*alpha1));</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>$$<br>P_{s,coeff} = \rho\varepsilon_s[1+2(1+e)\varepsilon_sg_0]<br>$$</p>
<p><code>granularPressureCoeffPrime</code> 函数计算的是 $\partial P_{s,coeff}/\partial \varepsilon_s$ 。</p>
<h5 id="3-2_SyamlalRogersOBrien_模型">3.2 SyamlalRogersOBrien 模型</h5><figure class="highlight julia"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>granularPressureModels<span class="type-annotation">::</span>SyamlalRogersOBrien<span class="type-annotation">::</span></span><br><span class="line">granularPressureCoeff</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> <span class="number">2.0</span>*rho1*(<span class="number">1.0</span> + <span class="literal">e</span>)*sqr(alpha1)*g0;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>granularPressureModels<span class="type-annotation">::</span>SyamlalRogersOBrien<span class="type-annotation">::</span></span><br><span class="line">granularPressureCoeffPrime</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0prime,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">return</span> rho1*alpha1*(<span class="number">1.0</span> + <span class="literal">e</span>)*(<span class="number">4.0</span>*g0 + <span class="number">2.0</span>*g0prime*alpha1);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>P_{s,coeff} = 2\rho(1+e)\varepsilon_s^2\cdot g_0<br>$$</p>
<h4 id="4-_frictionalStressModel">4. frictionalStressModel</h4><p>在稠密气固两相流中，当固相体积分率大于某个值时，单纯考虑跟颗粒温度关联的固相压力和固相粘性还不够，还需要考虑所谓的摩擦应力。这个类就是用来计算摩擦应力的。</p>
<p>有两种模型可选：</p>
<h5 id="4-1_Schaeffer_模型">4.1 Schaeffer 模型</h5><figure class="highlight gherkin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line">Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer</span><br><span class="line">(</span><br><span class="line">    const dictionary&amp; dict</span><br><span class="line">)</span><br><span class="line">:</span><br><span class="line">    frictionalStressModel(dict),</span><br><span class="line">    coeffDict_(dict.subDict(typeName + <span class="string">"Coeffs"</span>)),</span><br><span class="line">    phi_(<span class="string">"phi"</span>, dimless, coeffDict_.lookup(<span class="string">"phi"</span>))</span><br><span class="line">&#123;</span><br><span class="line">    phi_ <span class="keyword">*</span>= constant::mathematical::pi/180.0; </span><br><span class="line">    // 这个phi_是一个角度，从外部读取，在外部设置的时候，按角度的单位来设置，这里是将角度转换成弧度。</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">// <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> Destructor  <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> //</span><br><span class="line"></span><br><span class="line">Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::~Schaeffer()</span><br><span class="line">&#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">// <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> Member Functions  <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> //</span><br><span class="line"></span><br><span class="line">Foam::tmp<span class="variable">&lt;Foam::volScalarField&gt;</span></span><br><span class="line">Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::</span><br><span class="line">frictionalPressure</span><br><span class="line">(</span><br><span class="line">    const volScalarField&amp; alpha1,</span><br><span class="line">    const dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    const dimensionedScalar&amp; alphaMax</span><br><span class="line">) const</span><br><span class="line">&#123;</span><br><span class="line">    return</span><br><span class="line">        dimensionedScalar(<span class="string">"1e24"</span>, dimensionSet(1, -1, -2, 0, 0), 1e24)</span><br><span class="line">       <span class="keyword">*</span>pow(Foam::max(alpha1 - alphaMinFriction, scalar(0)), 10.0);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">Foam::tmp<span class="variable">&lt;Foam::volScalarField&gt;</span></span><br><span class="line">Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::</span><br><span class="line">frictionalPressurePrime</span><br><span class="line">(</span><br><span class="line">    const volScalarField&amp; alpha1,</span><br><span class="line">    const dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    const dimensionedScalar&amp; alphaMax</span><br><span class="line">) const</span><br><span class="line">&#123;</span><br><span class="line">    return</span><br><span class="line">        dimensionedScalar(<span class="string">"1e25"</span>, dimensionSet(1, -1, -2, 0, 0), 1e25)</span><br><span class="line">       <span class="keyword">*</span>pow(Foam::max(alpha1 - alphaMinFriction, scalar(0)), 9.0);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>P_{f} = 10^{24}\cdot max(\varepsilon_s-\varepsilon_{s,friMin},0)^{10}<br>$$<br> 同前面一样，<code>frictionalPressurePrime</code> 是  <code>frictionalPressure</code> 对固相体积分率的导数。</p>
<figure class="highlight perl"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br></pre></td><td class="code"><pre><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu</span><br><span class="line">(</span><br><span class="line">    const volScalarField&amp; alpha1,</span><br><span class="line">    const dimensionedScalar&amp; alphaMax,</span><br><span class="line">    const volScalarField&amp; pf,</span><br><span class="line">    const volSymmTensorField&amp; D</span><br><span class="line">) const</span><br><span class="line">&#123;</span><br><span class="line">    const <span class="keyword">scalar</span> I2Dsmall = <span class="number">1.0</span>e-<span class="number">15</span>;</span><br><span class="line"></span><br><span class="line">    <span class="regexp">//</span> Creating nu assuming it should be <span class="number">0</span> on the boundary which may <span class="keyword">not</span> be</span><br><span class="line">    // true</span><br><span class="line">    tmp&lt;volScalarField&gt; tnu</span><br><span class="line">    (</span><br><span class="line">        new volScalarField</span><br><span class="line">        (</span><br><span class="line">            IOobject</span><br><span class="line">            (</span><br><span class="line">                <span class="string">"Schaeffer:nu"</span>,</span><br><span class="line">                alpha1.mesh().<span class="keyword">time</span>().timeName(),</span><br><span class="line">                alpha1.mesh(),</span><br><span class="line">                IOobject::NO_READ,</span><br><span class="line">                IOobject::NO_WRITE,</span><br><span class="line">                false</span><br><span class="line">            ),</span><br><span class="line">            alpha1.mesh(),</span><br><span class="line">            dimensionedScalar(<span class="string">"nu"</span>, dimensionSet(<span class="number">0</span>, <span class="number">2</span>, -<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>), <span class="number">0</span>.<span class="number">0</span>)</span><br><span class="line">        )</span><br><span class="line">    );</span><br><span class="line"></span><br><span class="line">    volScalarField&amp; nuf = tnu();</span><br><span class="line"></span><br><span class="line">    forAll (D, celli)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span> (alpha1[celli] &gt; alphaMax.value() - <span class="number">5</span>e-<span class="number">2</span>)</span><br><span class="line">        &#123;</span><br><span class="line">            nuf[celli] =</span><br><span class="line">                <span class="number">0</span>.<span class="number">5</span>*pf[celli]*<span class="keyword">sin</span>(phi<span class="number">_</span>.value())</span><br><span class="line">               /(</span><br><span class="line">                    <span class="keyword">sqrt</span>(<span class="number">1.0</span>/<span class="number">6.0</span>*(<span class="keyword">s</span><span class="string">qr(D[celli].xx()</span> - D[celli].yy())</span><br><span class="line">                  + <span class="keyword">s</span><span class="string">qr(D[celli].yy()</span> - D[celli].zz())</span><br><span class="line">                  + <span class="keyword">s</span><span class="string">qr(D[celli].zz()</span> - D[celli].xx()))</span><br><span class="line">                  + <span class="keyword">s</span><span class="string">qr(D[celli].xy()</span>) + <span class="keyword">s</span><span class="string">qr(D[celli].xz()</span>)</span><br><span class="line">                  + <span class="keyword">s</span><span class="string">qr(D[celli].yz()</span>)) + I2Dsmall</span><br><span class="line">                );</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    // Correct coupled BCs</span><br><span class="line">    nuf.correctBoundaryConditions();</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> tnu;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>\nu_f = \left \{ \begin{aligned}<br> &amp; 0 ,  &amp;\varepsilon_s \le \varepsilon_{s,max} \\<br>&amp; \frac{0.5p_f sin\phi}{\sqrt{I_{2d}}}, &amp; \varepsilon_s > \varepsilon_{s,max}<br>\end{aligned} \right .<br>$$</p>
<p>其中，$p_f$ 代表的是上面的 <code>frictionalPressure</code><br>$$<br>D = \frac{1}{2}(\nabla U + \nabla U^T)<br>$$</p>
<p>$$<br>\sqrt{I_{2D}} = \frac{1}{6}[(D_{11}-D_{22})^2 + (D_{22}-D_{33})^2 + (D_{33}-D_{11})^2] + D_{12}^2 + D_{13}^2 + D_{23}^2<br>$$</p>
<h5 id="4-2_JohnsonJackson_模型">4.2 JohnsonJackson 模型</h5><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">class</span> JohnsonJackson</span><br><span class="line">:</span><br><span class="line">    <span class="keyword">public</span> frictionalStressModel</span><br><span class="line">&#123;</span><br><span class="line">    <span class="comment">// Private data</span></span><br><span class="line"></span><br><span class="line">        dictionary coeffDict_;</span><br><span class="line"></span><br><span class="line">        <span class="comment">//- Material constant for frictional normal stress</span></span><br><span class="line">        dimensionedScalar Fr_;</span><br><span class="line"></span><br><span class="line">        <span class="comment">//- Material constant for frictional normal stress</span></span><br><span class="line">        dimensionedScalar eta_;</span><br><span class="line"></span><br><span class="line">        <span class="comment">//- Material constant for frictional normal stress</span></span><br><span class="line">        dimensionedScalar p_;</span><br><span class="line"></span><br><span class="line">        <span class="comment">//- Angle of internal friction</span></span><br><span class="line">        dimensionedScalar phi_;</span><br><span class="line">        </span><br><span class="line">        </span><br><span class="line">Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::</span><br><span class="line">JohnsonJackson</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> dictionary&amp; dict</span><br><span class="line">)</span><br><span class="line">:</span><br><span class="line">    frictionalStressModel(dict),</span><br><span class="line">    coeffDict_(dict.subDict(typeName + <span class="string">"Coeffs"</span>)),</span><br><span class="line">    Fr_(<span class="string">"Fr"</span>, dimensionSet(<span class="number">1</span>, -<span class="number">1</span>, -<span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>), coeffDict_.lookup(<span class="string">"Fr"</span>)),</span><br><span class="line">    eta_(<span class="string">"eta"</span>, dimless, coeffDict_.lookup(<span class="string">"eta"</span>)),</span><br><span class="line">    p_(<span class="string">"p"</span>, dimless, coeffDict_.lookup(<span class="string">"p"</span>)),</span><br><span class="line">    phi_(<span class="string">"phi"</span>, dimless, coeffDict_.lookup(<span class="string">"phi"</span>))</span><br><span class="line">&#123;</span><br><span class="line">    phi_ *= constant::mathematical::pi/<span class="number">180.0</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //</span></span><br><span class="line"></span><br><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::</span><br><span class="line">frictionalPressure</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span></span><br><span class="line">        Fr_*<span class="built_in">pow</span>(max(alpha1 - alphaMinFriction, scalar(<span class="number">0</span>)), eta_)</span><br><span class="line">       /<span class="built_in">pow</span>(max(alphaMax - alpha1, scalar(<span class="number">5.0e-2</span>)), p_);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::</span><br><span class="line">frictionalPressurePrime</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMinFriction,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">return</span> Fr_*</span><br><span class="line">    (</span><br><span class="line">        eta_*<span class="built_in">pow</span>(max(alpha1 - alphaMinFriction, scalar(<span class="number">0</span>)), eta_ - <span class="number">1.0</span>)</span><br><span class="line">       *(alphaMax-alpha1)</span><br><span class="line">      + p_*<span class="built_in">pow</span>(max(alpha1 - alphaMinFriction, scalar(<span class="number">0</span>)), eta_)</span><br><span class="line">    )/<span class="built_in">pow</span>(max(alphaMax - alpha1, scalar(<span class="number">5.0e-2</span>)), p_ + <span class="number">1.0</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Foam::tmp&lt;Foam::volScalarField&gt;</span><br><span class="line">Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; alphaMax,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; pf,</span><br><span class="line">    <span class="keyword">const</span> volSymmTensorField&amp; D</span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">return</span> dimensionedScalar(<span class="string">"0.5"</span>, dimTime, <span class="number">0.5</span>)*pf*<span class="built_in">sin</span>(phi_);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这个模型的特点是需要设置一些跟材料有关的参数。<br>$$<br>P_{f} = F_r \frac{max(\varepsilon_s-\varepsilon_{s,friMin},0)^{\eta}}{max(\varepsilon_{s,max}-\varepsilon_{s},0)^{p}}<br>$$</p>
<p>$$<br>\nu_f = 0.5\cdot p_fsin\phi<br>$$<br>一些材料的物性参数建议值可参见”Derivation, Implementation and Validation of Computer Simulation Models for Gas-Solids Fluidized Beds” Table-3.5。</p>
<h4 id="5-_conductivityModel">5. conductivityModel</h4><p>这个类的作用是计算 颗粒温度方程中的颗粒温度传导系数，只有在使用偏微分方程求解颗粒温度是才会用到。</p>
<p>有三种可选：</p>
<h5 id="5-1_Syamlal_模型">5.1 Syamlal 模型</h5><figure class="highlight julia"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>conductivityModels<span class="type-annotation">::</span>Syamlal<span class="type-annotation">::</span>kappa</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; Theta,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; da,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> scalar sqrtPi = sqrt(constant<span class="type-annotation">::</span>mathematical<span class="type-annotation">::</span><span class="literal">pi</span>);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> rho1*da*sqrt(Theta)*</span><br><span class="line">    (</span><br><span class="line">        <span class="number">2.0</span>*sqr(alpha1)*g0*(<span class="number">1.0</span> + <span class="literal">e</span>)/sqrtPi</span><br><span class="line">      + (<span class="number">9.0</span>/<span class="number">8.0</span>)*sqrtPi*g0*<span class="number">0.25</span>*sqr(<span class="number">1.0</span> + <span class="literal">e</span>)*(<span class="number">2.0</span>*<span class="literal">e</span> - <span class="number">1.0</span>)*sqr(alpha1)</span><br><span class="line">       /(<span class="number">49.0</span>/<span class="number">16.0</span> - <span class="number">33.0</span>*<span class="literal">e</span>/<span class="number">16.0</span>)</span><br><span class="line">      + (<span class="number">15.0</span>/<span class="number">32.0</span>)*sqrtPi*alpha1/(<span class="number">49.0</span>/<span class="number">16.0</span> - <span class="number">33.0</span>*<span class="literal">e</span>/<span class="number">16.0</span>)</span><br><span class="line">    );</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>\kappa = \rho d_p \sqrt{\Theta}\left [ 2 \varepsilon_s^2 g_0 \frac{1+e}{\sqrt{\pi}} + \frac{\frac{9}{8} \sqrt{\pi}g_0 \cdot 0.25(1+e)^2(2e-1)\varepsilon_s^2}{49/16-33e/16} + \frac{\frac{15}{32}\sqrt{\pi} \cdot \varepsilon_s }{49/16-33e/16} \right ]<br>$$</p>
<h5 id="5-2_HrenyaSinclair_模型">5.2 HrenyaSinclair 模型</h5><figure class="highlight gherkin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line">Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair</span><br><span class="line">(</span><br><span class="line">    const dictionary&amp; dict</span><br><span class="line">)</span><br><span class="line">:</span><br><span class="line">    conductivityModel(dict),</span><br><span class="line">    coeffDict_(dict.subDict(typeName + <span class="string">"Coeffs"</span>)),</span><br><span class="line">    L_(<span class="string">"L"</span>, dimensionSet(0, 1, 0, 0, 0), coeffDict_.lookup(<span class="string">"L"</span>))</span><br><span class="line">&#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">// <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> Destructor  <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> //</span><br><span class="line"></span><br><span class="line">Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::</span><br><span class="line">~HrenyaSinclair()</span><br><span class="line">&#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">// <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> Member Functions  <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> <span class="keyword">*</span> //</span><br><span class="line"></span><br><span class="line">Foam::tmp<span class="variable">&lt;Foam::volScalarField&gt;</span></span><br><span class="line">Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa</span><br><span class="line">(</span><br><span class="line">    const volScalarField&amp; alpha1,</span><br><span class="line">    const volScalarField&amp; Theta,</span><br><span class="line">    const volScalarField&amp; g0,</span><br><span class="line">    const volScalarField&amp; rho1,</span><br><span class="line">    const volScalarField&amp; da,</span><br><span class="line">    const dimensionedScalar&amp; e</span><br><span class="line">) const</span><br><span class="line">&#123;</span><br><span class="line">    const scalar sqrtPi = sqrt(constant::mathematical::pi);</span><br><span class="line"></span><br><span class="line">    volScalarField lamda</span><br><span class="line">    (</span><br><span class="line">        scalar(1) + da/(6.0<span class="keyword">*</span>sqrt(2.0)<span class="keyword">*</span>(alpha1 + scalar(1.0e-5)))/L_</span><br><span class="line">    );</span><br><span class="line"></span><br><span class="line">    return rho1<span class="keyword">*</span>da<span class="keyword">*</span>sqrt(Theta)<span class="keyword">*</span></span><br><span class="line">    (</span><br><span class="line">        2.0<span class="keyword">*</span>sqr(alpha1)<span class="keyword">*</span>g0<span class="keyword">*</span>(1.0 + e)/sqrtPi</span><br><span class="line">      + (9.0/8.0)<span class="keyword">*</span>sqrtPi<span class="keyword">*</span>g0<span class="keyword">*</span>0.25<span class="keyword">*</span>sqr(1.0 + e)<span class="keyword">*</span>(2.0<span class="keyword">*</span>e - 1.0)<span class="keyword">*</span>sqr(alpha1)</span><br><span class="line">       /(49.0/16.0 - 33.0<span class="keyword">*</span>e/16.0)</span><br><span class="line">      + (15.0/16.0)<span class="keyword">*</span>sqrtPi<span class="keyword">*</span>alpha1<span class="keyword">*</span>(0.5<span class="keyword">*</span>sqr(e) + 0.25<span class="keyword">*</span>e - 0.75 + lamda)</span><br><span class="line">       /((49.0/16.0 - 33.0<span class="keyword">*</span>e/16.0)<span class="keyword">*</span>lamda)</span><br><span class="line">      + (25.0/64.0)<span class="keyword">*</span>sqrtPi</span><br><span class="line">       /((1.0 + e)<span class="keyword">*</span>(49.0/16.0 - 33.0<span class="keyword">*</span>e/16.0)<span class="keyword">*</span>lamda<span class="keyword">*</span>g0)</span><br><span class="line">    );</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这个模型需要输入一个特征长度 L。<br>$$<br>\begin{aligned} \kappa = \ &amp; \rho d_p \sqrt{\Theta} \, [  2\varepsilon_s^2 g_0 \frac{1+e}{\sqrt{\pi}} + \frac{\frac{9}{8} \sqrt{\pi}g_0 \cdot 0.25(1+e)^2(2e-1)\varepsilon_s^2}{49/16-33e/16} \\<br>\ + &amp;\frac{\frac{15}{16}\sqrt{\pi} \varepsilon_s \cdot (0.5e^2+0.25e-0.75+\lambda) }{(49/16-33e/16)\lambda} + \frac{\frac{25}{64}\sqrt{\pi}}{(1+e)(49/16-33e/16)\lambda g_0}<br>  ] \end{aligned}<br>$$</p>
<p>其中<br>$$<br>\lambda = 1+\frac{d_p}{6\sqrt{2}\varepsilon_s L}<br>$$</p>
<h5 id="5-3_Gidaspow_模型">5.3 Gidaspow 模型</h5><figure class="highlight julia"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">Foam<span class="type-annotation">::</span>tmp&lt;Foam<span class="type-annotation">::</span>volScalarField&gt;</span><br><span class="line">Foam<span class="type-annotation">::</span>kineticTheoryModels<span class="type-annotation">::</span>conductivityModels<span class="type-annotation">::</span>Gidaspow<span class="type-annotation">::</span>kappa</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; alpha1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; Theta,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; g0,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; rho1,</span><br><span class="line">    <span class="keyword">const</span> volScalarField&amp; da,</span><br><span class="line">    <span class="keyword">const</span> dimensionedScalar&amp; <span class="literal">e</span></span><br><span class="line">) <span class="keyword">const</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">const</span> scalar sqrtPi = sqrt(constant<span class="type-annotation">::</span>mathematical<span class="type-annotation">::</span><span class="literal">pi</span>);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">return</span> rho1*da*sqrt(Theta)*</span><br><span class="line">    (</span><br><span class="line">        <span class="number">2.0</span>*sqr(alpha1)*g0*(<span class="number">1.0</span> + <span class="literal">e</span>)/sqrtPi</span><br><span class="line">      + (<span class="number">9.0</span>/<span class="number">8.0</span>)*sqrtPi*g0*<span class="number">0.5</span>*(<span class="number">1.0</span> + <span class="literal">e</span>)*sqr(alpha1)</span><br><span class="line">      + (<span class="number">15.0</span>/<span class="number">16.0</span>)*sqrtPi*alpha1</span><br><span class="line">      + (<span class="number">25.0</span>/<span class="number">64.0</span>)*sqrtPi/((<span class="number">1.0</span> + <span class="literal">e</span>)*g0)</span><br><span class="line">    );</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>$$<br>\kappa =  \rho d_p \sqrt{\Theta}\left [  2 \varepsilon_s^2 g_0 \frac{1+e}{\sqrt{\pi}}  + \frac{9}{8}\sqrt{\pi}g_0\cdot 0.5(1+e)\varepsilon_s^2  + \frac{15}{16}\sqrt{\pi} \varepsilon_s +\frac{25}{64}\frac{\sqrt{\pi}}{(1+e)g_0}\right ]<br>$$</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://xiaopingqiu.github.io/2015/09/19/kineticTheoryModelSubModels/" data-id="cj2lay32x002nkkmb6n8o6vda" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Code-Explained/">Code Explained</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/OpenFOAM/">OpenFOAM</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2015/09/19/TFM-TurbulenceModel/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          OpenFOAM-2.3.x 中的 twoPhaseEulerFoam 解析之 TurbulenceModel
        
      </div>
    </a>
  
  
    <a href="/2015/09/19/kineticTheoryModel/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">OpenFOAM-2.3.x 中的 twoPhaseEulerFoam 解析之 kineticTheoryModel</div>
    </a>
  
</nav>

  
</article>


<section id="comments">
  <!-- 多说评论框 start -->
  <div class="ds-thread" data-thread-key="post-kineticTheoryModelSubModels" data-title="OpenFOAM-2.3.x 中的 twoPhaseEulerFoam 解析之 kineticTheoryModel 的子模型" data-url="http://xiaopingqiu.github.io/2015/09/19/kineticTheoryModelSubModels/"></div>
  <!-- 多说评论框 end -->
  <!-- 多说公共JS代码 start (一个网页只需插入一次) -->
  <script type="text/javascript">
  var duoshuoQuery = {short_name:"xiaopingqiu"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
  <!-- 多说公共JS代码 end -->
</section>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/C/">C++</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/DEM/">DEM</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/OpenFOAM/">OpenFOAM</a><span class="category-list-count">44</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Paraview/">Paraview</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/swak4Foam/">swak4Foam</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/test/">test</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/vim/">vim</a><span class="category-list-count">1</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Boundary-conditions/">Boundary conditions</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/">C++</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CentOS/">CentOS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Code-Explained/">Code Explained</a><span class="tag-list-count">29</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LES/">LES</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LIGGGHTS/">LIGGGHTS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ODE/">ODE</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/OpenFOAM/">OpenFOAM</a><span class="tag-list-count">20</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Postprocessing/">Postprocessing</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Preprocessing/">Preprocessing</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/RTS/">RTS</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/TIL/">TIL</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Windows/">Windows</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/fvOptions/">fvOptions</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/groovyBC/">groovyBC</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/paraview/">paraview</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/test/">test</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/thermophysicalModels/">thermophysicalModels</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/turbulence-model/">turbulence model</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wall-functions/">wall functions</a><span class="tag-list-count">4</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Boundary-conditions/" style="font-size: 15.56px;">Boundary conditions</a><a href="/tags/C/" style="font-size: 11.11px;">C++</a><a href="/tags/CentOS/" style="font-size: 10px;">CentOS</a><a href="/tags/Code-Explained/" style="font-size: 20px;">Code Explained</a><a href="/tags/LES/" style="font-size: 10px;">LES</a><a href="/tags/LIGGGHTS/" style="font-size: 10px;">LIGGGHTS</a><a href="/tags/ODE/" style="font-size: 10px;">ODE</a><a href="/tags/OpenFOAM/" style="font-size: 18.89px;">OpenFOAM</a><a href="/tags/Postprocessing/" style="font-size: 17.78px;">Postprocessing</a><a href="/tags/Preprocessing/" style="font-size: 11.11px;">Preprocessing</a><a href="/tags/RTS/" style="font-size: 12.22px;">RTS</a><a href="/tags/TIL/" style="font-size: 10px;">TIL</a><a href="/tags/Windows/" style="font-size: 10px;">Windows</a><a href="/tags/fvOptions/" style="font-size: 11.11px;">fvOptions</a><a href="/tags/groovyBC/" style="font-size: 10px;">groovyBC</a><a href="/tags/paraview/" style="font-size: 10px;">paraview</a><a href="/tags/test/" style="font-size: 11.11px;">test</a><a href="/tags/thermophysicalModels/" style="font-size: 14.44px;">thermophysicalModels</a><a href="/tags/turbulence-model/" style="font-size: 16.67px;">turbulence model</a><a href="/tags/vim/" style="font-size: 10px;">vim</a><a href="/tags/wall-functions/" style="font-size: 13.33px;">wall functions</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">五月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/">八月 2016</a><span class="archive-list-count">8</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/06/">六月 2016</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/05/">五月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">四月 2016</a><span class="archive-list-count">12</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">三月 2016</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">十二月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">十一月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">十月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">九月 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">八月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">六月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/">五月 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/04/">四月 2015</a><span class="archive-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2017/05/12/duoshuoAnnouncement/">多说评论系统将停止提供服务</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewScritps/">Paraview 脚本一例</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewCamera/">Paraview 中有关 Camera 的操作两例</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewCustomFilter/">Paraview 中创建 Custom Filter</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewStreamLineOnSlice/">在 Paraview 中画截面上的流线</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2017 Giskard Q.<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

<script src="//dn-lbstatics.qbox.me/lbservice/busuanzi/2.0/busuanzi.mini.js"/></script>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/atom.xml" class="mobile-nav-link">Rss</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-62501686-1', 'auto');
  ga('send', 'pageview');

</script>

  </div>
<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</body>
</html>